// 库存管理接口
import request from "@/common/request.js";
const api = {
  machining_in: "/machining_in/",
  machining: "/machining/",
  warehouse: "/warehouse/",
  machining_product: "/machining_product/",
  machining_in_product: "/machining_in_product/",
};

const enInApi = {
  get_machining_in_product(params) {
    return request({
      url: api.machining_in_product,
      method: "get",
      params,
    });
  },

  get_machining_product(params) {
    return request({
      url: api.machining_product,
      method: "get",
      params,
    });
  },

  get_warehouse(params) {
    return request({
      url: api.warehouse,
      method: "get",
      params,
    });
  },

  get_machining(params) {
    return request({
      url: api.machining,
      method: "get",
      params,
    });
  },

  get_product(params) {
    return request({
      url: api.product,
      method: "get",
      params,
    });
  },

  get_machining_in(params) {
    return request({
      url: api.machining_in,
      method: "get",
      params,
    });
  },

  machining_in_detail(id) {
    return request({
      url: api.machining_in + id,
      method: "get",
    });
  },

  post_machining_in(data) {
    return request({
      url: api.machining_in,
      method: "post",
      data,
    });
  },

  patch_machining_in(data, id) {
    return request({
      url: api.machining_in + id + "/",
      method: "patch",
      data,
    });
  },

  delete_machining_in(id) {
    return request({
      url: api.machining_in + id + "/",
      method: "delete",
    });
  },
};
export default enInApi
